import 'package:flutter/material.dart';

class MyText extends StatelessWidget {
  final String text;
  final TextStyle? textStyle;
  final double? fontSize;
  final Color? color;
  final FontWeight? fontWeight;
  final int? maxLines;

  const MyText(this.text, {super.key, this.textStyle, this.fontSize, this.color, this.fontWeight, this.maxLines});

  @override
  Widget build(BuildContext context) {
    return Text(
      text,
      maxLines: maxLines,
      overflow: TextOverflow.ellipsis,
      style: textStyle ?? TextStyle(fontSize: fontSize, color: color, fontWeight: fontWeight),
    ); // 这里可以替换成你想要显示的文本;
  }
}
